import { ref, computed, reactive } from 'vue'
import { defineStore } from 'pinia'
export default defineStore('user', () => {
  const user = reactive({
    name: '张三',
    type: '学生'
  })
 
  function setUser(newUser) {
    user.name = newUser.name
    user.type = newUser.type
  }

  return { setUser, user }
})
